package com.xyhuo.leetcode.december;

import java.util.Arrays;

/**
 * 合并两个有序数组
 * https://leetcode.cn/problems/merge-sorted-array/
 *
 * @time 2023/12/29
 */
public class MergeSortedArray {

    public void merge(int[] nums1, int m, int[] nums2, int n) {
        for (int i = 0; i < n; i++) {
            nums1[m + i] = nums2[i];
        }
        Arrays.sort(nums1);
    }
}
